require "premake/core"

workspace "webrtc_audio_processing"
	configurations { "Debug", "Release" }
	exceptionhandling "On"
	
	includedirs{
		"./",
	}
	
if is_pfm("android") then
	location "android/jni"
	
	defines {
		"__STDC_FORMAT_MACROS",
	}
elseif is_pfm("windows") then
	location "win32"
	system "windows"
	defines { 
		"_WIN32", 
		"WIN32",
		"_WINDOWS" , 
		"NOMINMAX",
		"WIN32_LEAN_AND_MEAN",
		"_CRT_SECURE_NO_WARNINGS",
	}
	disablewarnings {
		"4819",
		"4996"
	}
	flags {"EnableSSE2"} 
	
elseif is_pfm("ios") then
	location "ios"
	defines { 
		"__arm64__",
		"WEBRTC_POSIX",
		"WEBRTC_IOS",
		"WEBRTC_HAS_NEON",
		"WEBRTC_NS_FIXED",
	}
end	
	
	
filter "configurations:Debug"
	defines { "DEBUG" , "_DEBUG","_CRTDBG_MAP_ALLOC"}
	flags { "Symbols" }

	
filter "configurations:Release"
	defines { "NDEBUG"}
    optimize "On"
    flags { "OptimizeSpeed"} 
	

include "base"